const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('D_Micronutrient', {
    ID: {
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    Sample_ID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "样品ID"
    },
    Sample_Name: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "样品名称"
    },
    Sample_fractions: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "Sample fractions"
    },
    Measurement_date_time: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "Measurement date\/time"
    },
    Li: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Li(ppm)"
    },
    Be: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Be(ppm)"
    },
    B: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "B(ppm)"
    },
    K: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "K(ppm)"
    },
    Sc: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sc(ppm)"
    },
    V: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "V(ppm)"
    },
    Cr: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cr(ppm)"
    },
    Co: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Co(ppm)"
    },
    Ni: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ni(ppm)"
    },
    Cu: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cu(ppm)"
    },
    Zn: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Zn(ppm)"
    },
    Ga: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ga(ppm)"
    },
    Ge: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ge(ppm)"
    },
    Rb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Rb(ppm)"
    },
    Sr: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sr(ppm)"
    },
    Y: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Y(ppm)"
    },
    Zr: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Zr(ppm)"
    },
    Nb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Nb(ppm)"
    },
    Cs: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cs(ppm)"
    },
    Ba: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ba(ppm)"
    },
    La: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "La(ppm)"
    },
    Ce: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ce(ppm)"
    },
    Pr: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Pr(ppm)"
    },
    Nd: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Nd(ppm)"
    },
    Sm: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sm(ppm)"
    },
    Eu: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Eu(ppm)"
    },
    Gd: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Gd(ppm)"
    },
    Tb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tb(ppm)"
    },
    Dy: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Dy(ppm)"
    },
    Ho: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ho(ppm)"
    },
    Er: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Er(ppm)"
    },
    Tm: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tm(ppm)"
    },
    Yb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Yb(ppm)"
    },
    Lu: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Lu(ppm)"
    },
    Hf: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Hf(ppm)"
    },
    Ta: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ta(ppm)"
    },
    Tl: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tl(ppm)"
    },
    Pb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Pb(ppm)"
    },
    Bi: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Bi(ppm)"
    },
    Th: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Th(ppm)"
    },
    U: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "U(ppm)"
    },
    Os: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Os(ppm)"
    },
    Ir: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ir(ppm)"
    },
    Ru: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ru(ppm)"
    },
    Rh: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Rh(ppm)"
    },
    Pt: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Pt(ppm)"
    },
    Pd: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Pd(ppm)"
    },
    Re: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Re(ppm)"
    },
    Ag: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ag(ppm)"
    },
    Al: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Al(ppm)"
    },
    As_: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "As(ppm)"
    },
    Au: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Au(ppm)"
    },
    Ca: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ca(ppm)"
    },
    Cd: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cd(ppm)"
    },
    Fe: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Fe(ppm)"
    },
    Hg: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Hg(ppm)"
    },
    In_: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "In(ppm)"
    },
    Mg: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Mg(ppm)"
    },
    Mn: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Mn(ppm)"
    },
    Mo: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Mo(ppm)"
    },
    Na: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Na(ppm)"
    },
    P: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "P(ppm)"
    },
    S: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "S(ppm)"
    },
    Si: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Si(ppm)"
    },
    Sb: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sb(ppm)"
    },
    Se: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Se(ppm)"
    },
    Sn: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sn(ppm)"
    },
    Tc: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tc(ppm)"
    },
    Te: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Te(ppm)"
    },
    Ti: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ti(ppm)"
    },
    W: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "W(ppm)"
    },
    remarks: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "备注"
    },
    OrderNo: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "排序"
    },
    status: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "是否启用"
    },
    CreateID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "创建人ID"
    },
    Creator: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "创建人"
    },
    CreateDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "创建时间"
    },
    ModifyID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "修改人ID"
    },
    Modifier: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "修改人"
    },
    ModifyDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间"
    }
  }, {
    sequelize,
    tableName: 'D_Micronutrient',
    schema: 'public',
    timestamps: false,
    indexes: [
      {
        name: "D_Micronutrient_ID_idx",
        fields: [
          { name: "ID" },
        ]
      },
      {
        name: "D_Micronutrient_Sample_ID_idx",
        fields: [
          { name: "Sample_ID" },
        ]
      },
      {
        name: "D_Micronutrient_pkey",
        unique: true,
        fields: [
          { name: "ID" },
        ]
      },
    ]
  });
};
